const schedule = require('node-schedule');//定时器
const app =  require('./app');
const del = require('./delete');
const shop = require('./puppeteer/shopSearch');

let rule = new schedule.RecurrenceRule();
rule.second = 00;
rule.minute = 40;
rule.hour = 00;
let job = schedule.scheduleJob(rule, app);

let rule_del  = new  schedule.RecurrenceRule();
rule_del.second = 00;
rule_del.minute = 36;
rule_del.hour = 20;
let job_del = schedule.scheduleJob(rule_del, del);

// let rule_shop =  new schedule.RecurrenceRule();
// rule_shop.second = 00;
// rule_shop.minute = 35;
// rule_shop.hour = 18;
// rule_shop.dayOfWeek = 5;
// let job_shop = schedule.scheduleJob(rule_shop,shop); 
/**
 * 
 * dayOfWeek:0-7 //0 || 7 => sun
 */